<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + request.getContextPath() + "/";
%>
<base href="<%=basePath%>">
<aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
            <%--头像img--%>
            <div class="pull-left image">
                <img src="${pageContext.request.contextPath}/img/user2-160x160.jpg" class="img-circle" alt="User Image">
            </div>
            <div class="pull-left info">
                <p>
                    <security:authentication property="principal.username"/>
                </p>
                <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
            </div>
        </div>

        <!-- sidebar menu: : style can be found in sidebar.less -->
        <ul class="sidebar-menu">
            <li class="header">菜单</li>
            <li id="admin-index">
                <a href="${pageContext.request.contextPath}/main">
                    <i class="fa fa-dashboard"></i>
                    <span>首页</span>
                </a>
            </li>
                <c:if test="${not empty permissionVos}">
                    <c:forEach items="${permissionVos}" var="permissionVo">
                        <li class="treeview">
                        <a href="${permissionVo.href}">
<%--                            <i class="fa fa-cogs"></i>--%>
                            <i class="${permissionVo.icon}"></i>
                            <span>${permissionVo.permissionName}</span>
                            <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
				    </span>
                        </a>
                        <ul class="treeview-menu">
                            <c:set value="${permissionVo.subPermission}" var="menus" scope="request"/>
                            <jsp:include page="menu-bar.jsp"/>
                        </ul>
                        </li>
                    </c:forEach>
                </c:if>
        </ul>
    </section>
    <!-- /.sidebar -->
</aside>